package com.tech.zhidengxian.model.dto.page;

public class PageQuery {
    private static Integer DEFAULT_PAGE = 1;
    private static Integer DEFAULT_PAGE_SIZE = 20;
    private Integer currentPage;
    private Integer pageSize;

    public Integer getCurrentPage() {
        return this.currentPage != null ? this.currentPage : DEFAULT_PAGE;
    }

    public Integer getPageSize() {
        return this.pageSize != null ? this.pageSize : DEFAULT_PAGE_SIZE;
    }


    public PageQuery() {
        this.currentPage = DEFAULT_PAGE;
        this.pageSize = DEFAULT_PAGE_SIZE;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
}
